package com.zy.stock.service;

import java.util.List;

import com.zy.stock.domain.Pager;
import com.zy.stock.domain.UserStockRl;
import com.zy.stock.dto.StockDto;
import com.zy.stock.dto.UserStockRlDto;
import com.zy.stock.dto.UserStockRlProfitDto;

public interface UserStockRlService {
	
	/**
	 * 根据条件进行分页查询
	 * @param {@link BillDto}
	 * @param start 起始下标
	 * @param end 结束下标
	 * @return List<Ammeter>
	 * */
	public Pager<List<UserStockRl>> findByCase(Pager<UserStockRlDto> pager) throws Exception;
	
	public Integer save(UserStockRl obj)throws Exception;
	
	public void deleteById(Integer id)throws Exception;

	public void update(UserStockRl userStockRl)throws Exception;

	public UserStockRl findById(Integer id)throws Exception;
	
	public Double getCost(Integer operateNum, Double suggestValue,String stockCode);
	
	public List<UserStockRl> findLastUserStockRl(Integer userId,Integer stockId,String years);
	
	public List<UserStockRl> findByCode(String code);
	
	public double calculateEarnings(UserStockRl rl);
	
	public double calculateStaticEarnings(UserStockRl rl);

    public UserStockRl findByStoreNum(String storeNum);
    
    public List<UserStockRlProfitDto> findRlProfit(UserStockRlDto dto);
}
